//dispenser.h
/********************************************************************************
*																				*
*	Author:			Jared Szechy												*
*	Assignment:		Assignment 1												*
*	Class:			CPS-151														*
*	Instructor:		V. Starkley													*
*	Due Date:		August 30													*
*																				*
*	This file declares the functions needed for the dispenser class.			*
*																				*
********************************************************************************/

#ifndef DISPENSER_H
#define DISPENSER_H

#include <string>
using namespace std;

class Dispenser
{
	public:

		//constructors
		Dispenser();

		Dispenser(string name, double cst, int quant);

		//mutator functions

		void setProductName(string name);
		//pre: none
		//post: productName = name

		void setCost(double cst);
		//pre: none
		//post: cost = cst

		void setQuantityOnHand(int quantity);
		//pre: none
		//post: quantityOnHand = quantity

		void makeSale();
		//pre: none
		//post: decreases quantity by one

		//accessor functions

		string getProductName();
		//pre: none
		//post: returns productName

		double getCost();
		//pre: none
		//post: returns cost

		int getQuantityOnHand();
		//pre: none
		//post: returns quantityOnHand

		//overload operators

		friend ostream& operator << (ostream& fout, Dispenser d);
		//pre: fout is open for output
		//post: the product information id outputted

	private:

		string productName;
		double cost;
		int quantityOnHand;
};

#endif